// 支付页面小仓库
import {getOrderAPI} from '@/api/pay'

const state = {
    payInfo:{}
}
const actions = {
    // 获取支付信息
    async getPayInfo({commit},id){
        let res = await getOrderAPI(id);
        if(res.code==1){
            commit('GETPAYINFO',res.result);
        }
    }
}
const mutations = {
    GETPAYINFO(state,payInfo){
        state.payInfo = payInfo;
    }
}
const getters = {}

export default {
    namespaced:true,
    state,
    actions,
    mutations,
    getters,
}